home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 104 / MacAddict_104_2005-04.iso / Software / Internet & Communication / WordPress 1.2.2 freeware.dmg / wordpress / wp-locations.php < prev    next >
Encoding:
PHP Script  |  2004-03-01  |  1.1 KB  |  38 lines

  1. <?php $blog = 1; // enter your blog's ID
  2. header('Content-type: text/xml');
  3. include('wp-blog-header.php');
  4. ?><?php echo "<?xml version=\"1.0\"?".">\n"; ?>
  5. <travels>
  6. <?php
  7. $start = count($posts)-1;
  8. for ($i = $start; $i >= 0; $i--) {
  9.     $post = $posts[$i];
  10.     start_wp();
  11.     if ((get_Lon() != null) && (get_Lon > -360) && (get_Lon() < 360 )) {
  12. ?>
  13.     <location arrival="<?php the_date_xml() ?>">
  14.         <name><?php the_title_rss() ?></name>
  15.         <latitude><?php print_Lat() ?></latitude>
  16.         <longitude><?php print_Lon() ?></longitude>
  17. <?php
  18.         if (get_settings('rss_use_excerpt')) {
  19. ?>
  20.         <note><?php the_content_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?>
  21.         </note>
  22. <?php
  23.         } else { // use content
  24. ?>
  25.         <note><?php the_excerpt_rss('', 0, '', get_settings('rss_excerpt_length'), get_settings('rss_encoded_html')) ?></note>
  26. <?php
  27.         } // end else use content
  28. ?>
  29.         <url><?php permalink_single_rss() ?></url>
  30.     </location>
  31. <?php
  32.     } // end if lon valid
  33. ?>
  34. <?php
  35. } // end loop
  36. ?>
  37. </travels>
  38.